import request from '@/utils/request'

const API = '/admin/hosp/hospitalSet'
export default {
  getHospSetPage(pageNum, size, searchObj) {
    return request({
      url: `${API}/page/${pageNum}/${size}`,
      method: 'post',
      //   如果是Json数据的话data 如果是普通参数的话 parmas
      data: searchObj
    })
  },
  removeHospSet(id) {
    return request({
      url: `${API}/deleteById/${id}`,
      method: 'delete'
    })
  },
  save(hospset) {
    return request({
      url: `${API}/save`,
      method: 'post',
      data: hospset
    })
  },
  datail(id) {
    return request({
      url: `${API}/getHospSet/${id}`,
      method: 'get'
    })
  },
  updateData(HospitalSet) {
    return request({
      url: `${API}/updateHospitalSet`,
      method: 'post',
      data: HospitalSet
    })
  },
  removeRows(list) {
    return request({
      url: `${API}/batchRemove`,
      method: 'delete',
      data: list
    })
  },
  lockHospSet(id, status) {
    return request({
      url: `${API}/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  }
}
